package com.nutricia.biz.impl;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.nutricia.common.api.result.QueryMyMeeting;
import com.nutricia.common.api.result.ReturnDataRes;
import com.nutricia.common.lang.ServiceCallBack;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 主界面相关接口
* @author wangzl
* @date 2018年5月7日
 */
@Api(value="/mainInterface", description="主界面相关接口")
@RestController
@RequestMapping("/mainInterface")
public class MainInterfaceController extends AbstractFacadeImpl{
	
	/**
	 * 查询我创建的所有会议
	* @return
	* @author wangzl
	* @date 2018年3月15日
	 */
	@ApiOperation(value="queryMyMeeting", notes="查询我创建的所有会议")
	@RequestMapping(value="queryMyMeeting", method=RequestMethod.POST)
	public ReturnDataRes queryMyMeeting() {
		 final ReturnDataRes result = new ReturnDataRes();
		 return serviceExecuteTemplate.executeService(result, new ServiceCallBack() {
	            @Override
	            public void check() throws Exception {
	            	 //CheckUtil.isNotBlank(queryMyMeetingReq.getFounderId(),"创建人ID为空！");
	            }

	            @Override
	            public void doService() throws Exception {
	            	//查询我创建的所有会议并转换成前台所需info
	            	List<QueryMyMeeting> meetingLists = mainInterfaceService.queryMyMeetingById("12345");
	            	result.setCode("0000");
	            	result.setSuccess(true);
	            	result.setMessage("我创建的会议查询成功！");
	            	result.setData(meetingLists);
	            }
	        });
	}
	
	public void aaa1() {
		//微信获取code
		
	}
	
	//
	public void bbb2() {
		//通过回调域名拿到code
		
		//用code拿到用户id
		
		//怎么返回前台
		
	}
	
	
}
